#coding=UTF-8

from chinacQA.UI import *
LoginPage = WebPage('LoginPage', 'title','登录 Neo-CloudUltra -')

idusername = Editor('idusername', 'xpath', "//input[@id='id_username']", LoginPage, None)
idpassword = Editor('idpassword', 'xpath', "//input[@id='id_password']", LoginPage, None)
loginBtn = Button('loginBtn', 'xpath', "//button[@id='loginBtn']", LoginPage, None)


MainPage = WebPage('MainPage', 'title','项目详情 Neo-CloudUltra - yourCompany')

regionproject = Button('regionproject-combo-confirm', 'xpath', "//button[@id='region-project-combo-confirm']", MainPage, None)
Menu_Server = Button('Menu_Server', 'xpath', "//ul[@id='sidebar-accordion-compute']/li[1]/a", MainPage, None)
Menu_Snapshot = Button('Menu_Snapshot', 'xpath', "//ul[@id='sidebar-accordion-compute']/li[2]/a", MainPage, None)
Menu_Template = Button('Menu_Template', 'xpath', "//ul[@id='sidebar-accordion-compute']/li[3]/a", MainPage, None)
Menu_Cinder = Button('Menu_Cinder', 'xpath', "//ul[@id='sidebar-accordion-storage']/li[1]/a", MainPage, None)
Menu_CinderSnapShot = Button('Menu_CinderSnapShot', 'xpath', "//ul[@id='sidebar-accordion-storage']/li[2]/a", MainPage, None)
PublicNetworkMenu = Button('PublicNetworkMenu', 'xpath', "//ul[@id='sidebar-accordion-platformnetwork']/li[1]/a", MainPage, None)
RouterMenu = Button('RouterMenu', 'xpath', "//span[contains(text(),'路由器')]", MainPage, None)
FloatIPMenu = Button('FloatIPMenu', 'xpath', "//span[contains(text(),'浮动IP')]", MainPage, None)
CLBMenu = Button('CLBMenu', 'xpath', "//span[contains(text(),'负载均衡')]", MainPage, None)
QosMenu = Button('QosMenu', 'xpath', "//span[contains(text(),'QoS')]", MainPage, None)
NetworkTopologyMenu = Button('NetworkTopologyMenu', 'xpath', "//span[contains(text(),'网络拓扑')]", MainPage, None)
RelatedSQLMenu = Button('RelatedSQLMenu', 'xpath', "//ul[@id='side-menu']/li[5]/a/span", MainPage, None)
CacheMenu = Button('CacheMenu', 'xpath', "//ul[@id='side-menu']/li[6]/a/span", MainPage, None)
ResourceArrangeMenu = Button('ResourceArrangeMenu', 'xpath', "//span[contains(text(),'资源编排')]", MainPage, None)
AutoScalingMenu = Button('AutoScalingMenu', 'xpath', "//span[contains(text(),'弹性伸缩')]", MainPage, None)
FireWallMenu = Button('FireWallMenu', 'xpath', "//span[contains(text(),'防火墙')]", MainPage, None)
KeyPairMenu = Button('KeyPairMenu', 'xpath', "//span[contains(text(),'密钥对')]", MainPage, None)
ConsumeStatisticsMenu = Button('ConsumeStatisticsMenu', 'xpath', "//span[contains(text(),'消费统计')]", MainPage, None)
ConsumeDetailMenu = Button('ConsumeDetailMenu', 'xpath', "//span[contains(text(),'消费明细')]", MainPage, None)

# instances_action_launch = Button('instances_action_launch-ng', 'xpath', "//div[@id='content_body']/div[2]/div[1]/div/div[2]/div/form/div[1]//a[@id='instances__action_launch-ng']", MainPage, None)

MainPage1 = WebPage('MainPage1', 'title','云主机 Neo-CloudUltra - yourCompany')
Menu_Server1 = Button('Menu_Server1', 'xpath', "//ul[@id='sidebar-accordion-compute']/li[1]/a", MainPage1, None)
# instances_action_launch1 = Button('instances_action_launch-ng', 'xpath', "//a[@id='instances__action_launch-ng']", MainPage1, None)

instances_action_launch = Button('instances_action_launch-ng', 'xpath', "//a[contains(@class,'btn btn-primary btn-launch ng-scope')]", MainPage1, None)

# instances_action_launch = Button('instances_action_launch', 'xpath', "//a[@id='instances__action_launch-ng']", MainPage, None)
name = Editor('name', 'xpath', "//div[@id='createDetailsForm']/div[2]/fieldset/div[2]/div//input[@id='name']", MainPage1, None)
instancecount = Editor('instancecount', 'xpath', "//div[@id='createDetailsForm']/div[2]/fieldset/div[3]/div//input[@id='instance_count']", MainPage1, None)
flavorstype = ComboBox('flavorstype', 'xpath', "//div[@id='createDetailsForm']/div[2]/fieldset/div[5]/div//select[@id='flavors_type']", MainPage1, None,{})
flavor = ComboBox('flavor', 'xpath', "//div[@id='createDetailsForm']/div[2]/fieldset/div[6]/div//select[@id='flavor']", MainPage1, None,{})
sourcetype = ComboBox('sourcetype', 'xpath', "//div[@id='createDetailsForm']/div[2]/fieldset/div[7]/div//select[@id='source_type']", MainPage1, None,{})
souceimages = ComboBox('souceimages', 'xpath', "//div[@id='createDetailsForm']/div[2]/fieldset/div[8]/div[1]//select[@id='souce_images']", MainPage1, None,{})
textContent = Editor('textContent', 'xpath', "//div[@id='createDetailsForm']/div[2]/fieldset/div[9]/div//textarea[@id='textContent']", MainPage1, None)
# NextButton = Button('NextButton', 'xpath', "/html/body/div[5]/div/div/customcreateinstancewizard/div/div[3]/button[3]", MainPage1, None)
NextButton = Button('NextButton', 'xpath', "//span[contains(text(),'下一步')]", MainPage1, None)


sn = ComboBox('sn', 'xpath', "//div[@id='select']/fieldset/div[1]/div//select[@id='sn']", MainPage1, None,{})
ssn = ComboBox('ssn', 'xpath', "//select[@id='ssn']", MainPage1, None,{})

#snn = ComboBox('sn', 'xpath', "//select[@id='snn']", MainPage1, None,{})
NextButton2 = Button('NextButton2', 'xpath', "//span[contains(text(),'下一步')]", MainPage1, None)

kpcheck = CheckBox('kpcheck', 'xpath', "//input[@id='kpcheck']", MainPage1, None)
pswdcheck = CheckBox('pswdcheck', 'xpath', "//input[@id='pswdcheck']", MainPage1, None)
#adminpassword = Editor('adminpassword', 'xpath', "//input[@id='adminpassword']", MainPage1, None)
SecuritySetup = Button('SecuritySetup', 'xpath', "//div[@id='wizard-side-nav']/ul/li[3]/a/span[1]", MainPage1, None)
adminpassword = Editor('adminpassword', 'xpath', "//input[@id='adminpassword']/parent::div/input[2]", MainPage1, None)

# CreateButton = Button('CreateButton', 'xpath', "//div[contains(@class,'modal-footer')]", MainPage1, None)
CreateButton = Button('CreateButton', 'xpath', "//button[contains(@class,'btn btn-primary button-final')]", MainPage1, None)

instances = Table('instances', 'xpath', "//table[@id='instances']", MainPage1, None)
Server_editname = Editor('idname', 'xpath', "//input[@id='id_name']", MainPage1, None)
saveEditServer = Button('saveEditServer', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)
closeServer = Button('closeServer', 'xpath', "//a[contains(text(),'关闭')]", MainPage1, None)
Template_idname = Editor('Template_idname', 'xpath', "//input[@id='id_name']", MainPage1, None)
Template_check = Button('Template_check', 'xpath', "//span[contains(text(),'确认关机并')]", MainPage1, None)
TemplateConfirmButton = Button('TemplateConfirmButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)
noVNCstatus = Button('noVNCstatus', 'xpath', "//div[@id='noVNC_status']", MainPage1, None)
Snapshotidname = Editor('Snapshotidname', 'xpath', "//input[@id='id_name']", MainPage1, None)
SnapshotCreate = Button('SnapshotCreate', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)
idold_flavor_vcpus = Editor('idold_flavor_vcpus', 'xpath', "//input[@id='id_old_flavor_vcpus']", MainPage1, None)
idold_flavor_mem = Editor('idold_flavor_mem', 'xpath', "//input[@id='id_old_flavor_mem']", MainPage1, None)
HotUpgrateButton = Button('HotUpgrateButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)
idadmin_pass = Editor('idadmin_pass', 'xpath', "//input[@id='id_admin_pass']", MainPage1, None)
ModifyPWButton = Button('ModifyPWButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)
SoftRebootButton = Button('SoftRebootButton', 'xpath', "//a[contains(text(),'软重启')]", MainPage1, None)
HardRebootButton = Button('HardRebootButton', 'xpath', "//a[contains(text(),'硬重启')]", MainPage1, None)
instances_action_delete = Button('instances_action_delete', 'xpath', "//button[@id='instances__action_delete']", MainPage1, None)
DeleteServerButton = Button('DeleteServerButton', 'xpath', "//a[contains(text(),'删除')]", MainPage1, None)
ServerMoreAction = Button('ServerMoreAction', 'xpath', "//a[contains(text(),'更多操作')]", MainPage1, None)
Serinstances_action_delete = Button('instances_action_delete', 'xpath', "//button[@id='instances__action_delete']", MainPage1, None)

# ChooseCinder = Button('ChooseCinder', 'xpath', "//span[contains(text(),'选择云硬盘')]", MainPage1, None)
ChooseCinder = ComboBox('sddd', 'xpath', "//select[@id='id_volume']", MainPage1, None,{})
# ChooseCinderButton = Button('RREERER', 'xpath', "//a[contains(@class,'chosen-single')]", MainPage1, None)
# ChooseCinderButton = Button('ChooseCinderButton', 'xpath', "/html/body/div[2]/div/div/div/form/div[1]/fieldset/div/div/div/a/span", MainPage1, None)
# ChooseCinderButton = Button('ChooseCinderButton', 'xpath', "/html/body/div[2]/div/div/div/form/div[1]/fieldset/div/div/div/a/span", WEWE, None)
ChooseCinderButton = Button('ChooseCinderButton', 'xpath', "//div[@id='id_volume_chosen']", MainPage1, None)
ConnectCinderButton = Button('ConnectCinderButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)



vmsnapshot = Table('vmsnapshot', 'xpath', "//table[@id='vmsnapshot']", MainPage1, None)
vmsnapshot_action_delete = Button('vmsnapshot_action_delete', 'xpath', "//button[@id='vmsnapshot__action_delete']", MainPage1, None)

ServerSnapShotDelete = Button('ServerSnapShotDelete', 'xpath', "//a[contains(text(),'删除')]", MainPage1, None)
systemimages = Table('systemimages', 'xpath', "//table[@id='system_images']", MainPage1, None)
imagesTable = Table('images', 'xpath', "//table[@id='images']", MainPage1, None)
images_action_customize = Button('images_action_customize', 'xpath', "//a[@id='images__action_customize']", MainPage1, None)
ImageCreateidname = Editor('ImageCreateidname', 'xpath', "//input[@id='id_name']", MainPage1, None)
ChooseImageServer = Button('ChooseImageServer', 'xpath', "//div[@id='id_instance_chosen']", MainPage1, None)
Imageiddescription = Editor('Imageiddescription', 'xpath', "//textarea[@id='id_description']", MainPage1, None)
ImageCreateCommit = Button('ImageCreateCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)

images_action_delete = Button('images_action_delete', 'xpath', "//button[@id='images__action_delete']", MainPage1, None)
imageDeleteCommit = Button('imageDeleteCommit', 'xpath', "//a[contains(text(),'删除')]", MainPage1, None)

TemplateDelete = Button('TemplateDelete', 'xpath', "//a[contains(text(),'删除')]", MainPage1, None)


TestPager = WebPage('TestPager', 'title','概况 Neo-CloudUltra - yourCompany')
#BusinessManager = Button('BusinessManager', 'xpath', "//div[@id='content_body']/div[1]/nav/div[2]/div/ul[1]/li[3]/a", TestPager, None)
BusinessManager = Button('BusinessManager', 'xpath', "//span[contains(text(),'企业管理')]", TestPager, None)
ResourceManageTab = Button('ResourceManageTab', 'xpath', "//span[contains(text(),'资源管理')]", TestPager, None)

#ResourceManageTab = Button('ResourceManageTab', 'xpath', "//div[@id='content_body']/div[1]/nav/div[2]/div/ul[1]/li[1]/a/span", TestPager, None)
RegionMangeTap = Button('RegionMangeTap', 'xpath', "//span[contains(text(),'区域管理')]", TestPager, None)
Menu_Server2 = Button('Menu_Server', 'xpath', "//ul[@id='sidebar-accordion-compute']/li[1]/a", TestPager, None)


ee = WebPage('ee', 'title','项目 Neo-CloudUltra - yourCompany')
ManagerInfo = Button('ManagerInfo', 'xpath', "//span[contains(text(),'项目信息')]", ee, None)

# BusinessManager = Button('BusinessManager', 'xpath', "//div[@id='content_body']/div[1]/nav/div[2]/div/ul[1]/li[3]/a", ee, None)
# tenants_action_create = Button('tenants_action_create', 'xpath', "//div[@id='content_body']/div[2]/div[1]/div/div[2]/div/form/div[1]//a[@id='tenants__action_create']", ee, None)
tenants_action_create = Button('tenants_action_create', 'xpath', "//a[@id='tenants__action_create']", ee, None)
tenants = Table('tenants', 'xpath', "//table[@id='tenants']", ee, None)
deletePro = Button('deletePro', 'xpath', "//a[contains(text(),'删除')]", ee, None)

idname = Editor('idname', 'xpath', "//input[@id='id_name']", ee, None)
iddescription = Editor('iddescription', 'xpath', "//textarea[@id='id_description']", ee, None)
tabQuota = Button('tabQuota', 'xpath', "//a[contains(@href,'#create_project__create_quotas')]", ee, None)
quotaTable = Table('quotaTable', 'xpath', "//fieldset[@id='create_project__create_quotas']/div/table", ee, None)
createButton = Button('createButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", ee, None)
UserManager = Button('UserManager', 'xpath', "//span[contains(text(),'用户管理')]", ee, None)


userpager = WebPage('userpager', 'title','用户 Neo-CloudUltra - yourCompany')
users_action_create = Button('users_action_create', 'xpath', "//div[@id='content_body']/div[2]/div[1]/div/div[2]/div/form/div[1]//a[@id='users__action_create']", userpager, None)
users_action_delete = Button('users_action_delete', 'xpath', "//button[@id='users__action_delete']", userpager, None)
userstable = Table('userstable', 'xpath', "//table[@id='users']", userpager, None)
deleteuser = Button('deleteuser', 'xpath', "//a[contains(text(),'删除')]", userpager, None)

idname_u = Editor('idname', 'xpath', "//input[@id='id_name']", userpager, None)
iduser_name_u = Editor('iduser_name', 'xpath', "//input[@id='id_user_name']", userpager, None)
idemail = Editor('idemail', 'xpath', "//input[@id='id_email']", userpager, None)
idmobile = Editor('idmobile', 'xpath', "//input[@id='id_mobile']", userpager, None)
idpassword = Editor('idpassword', 'xpath', "//input[@id='id_password']", userpager, None)
idconfirm_password = Editor('idconfirm_password', 'xpath', "//input[@id='id_confirm_password']", userpager, None)
projectButton = Button('projectButton', 'xpath', "//span[contains(text(),'选择一个项')]", userpager, None)
idproject = ComboBox('idproject', 'xpath', "//select[@id='id_project']", userpager, None,{})

selectProject = Button('selectProject', 'xpath', "/html/body/div[2]/div/div/div/form/div[1]/fieldset/div[7]/div/div/ul", userpager, None)

toBeManager = Button('toBeManager', 'xpath', "//span[contains(text(),'设置成管理')]", userpager, None)
proje = Button('proje', 'xpath', "//span[contains(text(),'proje')]", userpager, None)


selectidrole = Button('selectidrole', 'xpath', "/html/body/div[2]/div/div/div/form/div[1]/fieldset/div[9]/div/div/ul", userpager, None)

idrole = ComboBox('idrole', 'xpath', "//select[@id='id_role_id']", userpager, None,{})
createUserButton = Button('createUserButton', 'xpath', "//form[@id='create_user_form']/div[2]/div/div/input", userpager, None)
adminrole = Button('adminrole', 'xpath', "//span[contains(@class,'user-role')]", userpager, None)
# loginout = Button('loginout', 'xpath', "//a[contains(text(),'退出')]", userpager, None)
# loginout = Button('loginout', 'xpath', "/html/body/div[1]/div[2]/div[1]/nav/div[2]/div/ul[2]/li[2]/ul/li[2]/a", userpager, None)

loginout = Button('loginout', 'xpath', "//a[contains(@href,'/auth/logout/')]", userpager, None)

ModifyPWPager = WebPage('ModifyPWPager', 'title','修改密码 Neo-CloudUltra - yourCompany')
currentPW = Editor('currentPW', 'xpath', "//div[@id='content_body']/div[2]/div[1]/div/div[2]/div/div/div/div/div[1]/div[1]/input", ModifyPWPager, None)
NewPW = Editor('NewPW', 'xpath', "//div[@id='content_body']/div[2]/div[1]/div/div[2]/div/div/div/div/div[1]/div[3]/input", ModifyPWPager, None)
ConfirmPW = Editor('ConfirmPW', 'xpath', "//div[@id='content_body']/div[2]/div[1]/div/div[2]/div/div/div/div/div[1]/div[5]/input", ModifyPWPager, None)
confirmButton = Button('confirmButton', 'xpath', "//button[contains(text(),'确认修改')]", ModifyPWPager, None)

# PrivateNetMenu = Button('PrivateNetMenu', 'xpath', "//*[@id='app']/div/div[1]/ul/li[5]/ul/li[2]/a/span", ee, None)


CancelButton = Button('CancelButton', 'xpath', "//a[contains(text(),'取消')]", MainPage1, None)
deleteserver = Button('deleteserver', 'xpath', "//a[contains(text(),'删除云主机')]", MainPage1, None)



PrivatePager = WebPage('network_private', 'title','创建私有网络 Neo-CloudUltra - huayun')


# private_net = Button('private_net', 'xpath', "//div[@id='app']/div/div[1]/ul/li[5]/ul/li[1]/a", network, None)
# router = Button('router', 'xpath', "//span[contains(text(),'路由器')]/parent::a", network, None)
# floating_ip = Button('floating_ip', 'xpath', "//span[contains(text(),'浮动IP')]/parent::a", network, None)
# lbaas = Button('lbaas', 'xpath', "//span[contains(text(),'负载均衡器')]/parent::a", network, None)
# firewall = Button('firewall', 'xpath', "//span[contains(text(),'防火墙')]/parent::a", network, None)

Menu_Server_p = Button('Menu_Server_p', 'xpath', "//ul[@id='sidebar-accordion-compute']/li[1]/a", PrivatePager, None)

# 私有网络列表
PrivateNetMenu = Button('PrivateNetMenu', 'xpath', ".//*[@id='sidebar-accordion-neonetwork']/li[1]/a/span", ee, None)
# 创建私有网络按钮
networks_action_create = Button('networks_action_create', 'xpath', "//div[@id='app']/div/div[2]/div[2]/div[1]/div[2]/div/div[2]/div/div[1]/div/div/button[1]/span", PrivatePager, None)

# project admin  添加私网

PrevateNet_action_create = Button('add_private_net', 'xpath', "//i[contains(@class,'iconfont icon-add')]", PrivatePager, None)
idname_privateNET = Editor('name', 'xpath', "//input[@name='name']", PrivatePager, None)
Prpject_admin_noshare = Button('share', 'xpath', "//span[contains(@style,'margin-top: 4px;')]", PrivatePager, None)
Prpject_admin_privateSubmit = Button('submit', 'xpath', "//button[contains(@class,'ult-btn ult-btn-primary ult-btn-medium')]", PrivatePager, None)

# 共享按钮为开
share =Button('share', 'xpath', "//span[contains(@class,'ult-switch ult-switch-checked')]", PrivatePager, None)
# 共享按钮为关
no_share = Button('share', 'xpath', "//span[contains(@class,'ult-switch')]", PrivatePager, None)

no_subnet = Button('not_add_subnet', 'xpath', "//span[contains(@class,'ult-switch m-b-sm')]", PrivatePager, None)
privateSubmit = Button('submit', 'xpath', "//div[@id='app']/div/div[2]/div[2]/div[1]/div[2]/div/div/div[1]/div/form/div[3]/button[2]/span", PrivatePager, None)

networksTable = Table('networks', 'xpath', "//*[@id="app"]/div/div[2]/div[2]/div[1]/div[2]/div/div[2]/div/div[2]/div/div[1]/div/div/div/table", PrivatePager, None)
networks_action_delete_net = Button('networks_action_delete_net', 'xpath', "//button[@id='networks__action_delete_net']", PrivatePager, None)


idsubnet_name = Editor('idsubnet_name', 'xpath', "//input[@id='id_subnet_name']", PrivatePager, None)
idcidr = Editor('idcidr', 'xpath', "//input[@id='id_cidr']", PrivatePager, None)
idgateway_ip = Editor('idgateway_ip', 'xpath', "//input[@id='id_gateway_ip']", PrivatePager, None)
SubNetDetail = Button('SubNetDetail', 'xpath', "//a[contains(text(),'子网详情')]", PrivatePager, None)
createNet = Button('createNet', 'xpath', "//input[contains(@class,'btn btn-primary')]", PrivatePager, None)
deletepriNet = Button('deletepriNet', 'xpath', "//a[contains(text(),'删除网络')]", PrivatePager, None)
EditPriNetidname = Editor('EditPriNetidname', 'xpath', "//input[@id='id_name']", PrivatePager, None)
SubDetailTab = Button('SubDetailTab', 'xpath', "//a[contains(text(),'子网详情')]", PrivatePager, None)
idallocation_pools = Editor('idallocation_pools', 'xpath', "//textarea[@id='id_allocation_pools']", PrivatePager, None)

PrivateNetSave = Button('PrivateNetSave', 'xpath', "//input[contains(@class,'btn btn-primary')]", PrivatePager, None)

CinderMenu = Button('CinderMenu', 'xpath', "//ul[@id='sidebar-accordion-storage']/li[1]/a/span", PrivatePager, None)

CinderPage = WebPage('CinderPage', 'title','云硬盘 Neo-CloudUltra - yourCompany')
volumes_action_create = Button('volumes_action_create', 'xpath', "//a[@id='volumes__action_create']", CinderPage, None)
Cinderidname = Editor('Cinderidname', 'xpath', "//input[@id='id_name']", CinderPage, None)
iddescription = Editor('iddescription', 'xpath', "//textarea[@id='id_description']", CinderPage, None)
CinderType = Button('CinderType', 'xpath', "//span[contains(text(),'容量型')]", CinderPage, None)
idsize = Editor('idsize', 'xpath', "//input[@id='id_size']", CinderPage, None)
ShareCidner = Button('ShareCidner', 'xpath', "//span[contains(text(),'共享盘')]", CinderPage, None)
CreateCinderButton = Button('CreateCinderButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)
volumeTable = Table('volumes', 'xpath', "//table[@id='volumes']", CinderPage, None)
DeleteCinderButton = Button('DeleteCinderButton', 'xpath', "//a[contains(text(),'删除云硬盘')]", CinderPage, None)

volumes_action_delete = Button('volumes_action_delete', 'xpath', "//button[@id='volumes__action_delete']", CinderPage, None)
CinderEditidname = Editor('CinderEditidname', 'xpath', "//input[@id='id_name']", CinderPage, None)
CinderEditiddescription = Editor('CinderEditiddescription', 'xpath', "//textarea[@id='id_description']", CinderPage, None)
CinderEditCommit = Button('CinderEditCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)
# CinderConnectCommbox = Button('CinderConnectCommbox', 'xpath', "//span[contains(text(),'请选择一个')]", CinderPage, None)
ChooseCinderConnect = Button('ChooseCinderButton', 'xpath', "//div[@id='id_instance_chosen']", MainPage1, None)

ConnectCommit = Button('ConnectCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)

volumeConnectTable = Table('volumeConnectTable', 'xpath', "//table[@id='attachments']", CinderPage, None)
DisconnectCommit = Button('DisconnectCommit', 'xpath', "/html/body/div[2]/div[2]/div/div/div[3]/a[2]", CinderPage, None)
Cinder2Snapshotidname = Editor('Cinder2Snapshotidname', 'xpath', "//input[@id='id_name']", CinderPage, None)
Cinder2SnapshotDec = Editor('Cinder2SnapshotDec', 'xpath', "//textarea[@id='id_description']", CinderPage, None)
Cinder2SnapshotCommit = Button('Cinder2SnapshotCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)
idnew_size = Editor('idnew_size', 'xpath', "//input[@id='id_new_size']", CinderPage, None)
CinderDCommit = Button('CinderDCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)
CopyCinderCommit = Button('CopyCinderCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)


volumesnapshotsTable = Table('volumesnapshotsTable', 'xpath', "//table[@id='volume_snapshots']", CinderPage, None)
volumesnapshots__action_delete = Button('volumesnapshots__action_delete', 'xpath', "//button[@id='volume_snapshots__action_delete']", CinderPage, None)
DeleteCinderSnapshot = Button('DeleteCinderSnapshot', 'xpath', "//a[contains(text(),'删除云硬盘')]", CinderPage, None)

SnapShot2Cindername = Editor('SnapShot2Cindername', 'xpath', "//input[@id='id_name']", CinderPage, None)
Snapshot2Cinderdescription = Editor('Snapshot2Cinderdescription', 'xpath', "//textarea[@id='id_description']", CinderPage, None)
Snapshot2Cinderidsize = Editor('Snapshot2Cinderidsize', 'xpath', "//input[@id='id_size']", CinderPage, None)
SnapShot2CinderCreate = Button('SnapShot2CinderCreate', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)

SnapShot2Editidname = Editor('SnapShot2Editidname', 'xpath', "//input[@id='id_name']", CinderPage, None)
Snapshot2Editiddescription = Editor('SnapshotEditiddescription', 'xpath', "//textarea[@id='id_description']", CinderPage, None)
SnapshotEditCommit = Button('SnapshotEditCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)
RollBackButton = Button('RollBackButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", CinderPage, None)


#RubbishMenu = Button('RubbishMenu', 'xpath', "//ul[@id='side-menu']/li[9]/a", CinderPage, None)
RubbishMenu = Button('RubbishMenu', 'xpath', "//ul[@id='side-menu']/li[10]/a/span", CinderPage, None)

volumerecycleTable = Table('volumerecycle', 'xpath', "//table[@id='volume_recycle']", CinderPage, None)
RubbishDeleteButton = Button('RubbishDeleteButton', 'xpath', "//a[contains(text(),'删除')]", CinderPage, None)
volumerecycle__action_delete = Button('volumerecycle__action_delete', 'xpath', "//button[@id='volume_recycle__action_delete']", CinderPage, None)



SnapShotCreatename = Editor('SnapShotCreatename', 'xpath', "//input[@id='name']", MainPage1, None)
SnapShotinstancecount = Editor('SnapShotinstancecount', 'xpath', "//input[@id='instance_count']", MainPage1, None)
Snapshotflavorstype = ComboBox('Snapshotflavorstype', 'xpath', "//select[@id='flavors_type']", MainPage1, None,{})
Snapshotflavor = ComboBox('Snapshotflavor', 'xpath', "//select[@id='flavor']", MainPage1, None,{})
SnapshottextContent = Editor('SnapshottextContent', 'xpath', "//textarea[@id='textContent']", MainPage1, None)
SnapshotNext1 = Button('SnapshotNext1', 'xpath', "//span[contains(text(),'下一步')]", MainPage1, None)
Snapshotsn = ComboBox('Snapshotsn', 'xpath', "//select[@id='sn']", MainPage1, None,{})
Snapshotssn = ComboBox('ssn', 'xpath', "//select[@id='ssn']", MainPage1, None,{})

SnapshotNext2 = Button('SnapshotNext2', 'xpath', "//button[contains(@class,'btn btn-primary button-next')]", MainPage1, None)
Snapshotkpcheck = CheckBox('Snapshotkpcheck', 'xpath', "//input[@id='kpcheck']", MainPage1, None)
Snapshotpswdcheck = CheckBox('Snapshotpswdcheck', 'xpath', "//input[@id='pswdcheck']", MainPage1, None)
Snapshotadminpassword = Editor('adminpassword', 'xpath', "//input[@id='adminpassword']/parent::div/input[2]", MainPage1, None)

#Snapshotadminpassword = Editor('Snapshotadminpassword', 'xpath', "//input[contains(@class,'form-control ng-pristine ng-untouched ng-invalid ng-invalid-required ng-valid-pattern ng-valid-minlength ng-valid-maxlength')]", MainPage1, None)
#Snapshotadminpassword = Editor('adminpassword', 'xpath', "//input[contains(@class,'form-control ng-pristine ng-invalid ng-invalid-required ng-valid-pattern ng-valid-minlength ng-valid-maxlength ng-touched')]", 322, None)

# SnapshotCreateButton = Button('SnapshotCreateButton', 'xpath', "//div[contains(@class,'modal-footer')]", MainPage1, None)
SnapshotRollBackButton = Button('SnapshotRollBackButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)
SnapshotCreateButton = Button('SnapshotCreateButton', 'xpath', "//button[contains(@class,'btn btn-primary button-final')]", MainPage1, None)


TemplatePage = WebPage('TemplatePage', 'title','镜像 Neo-CloudUltra - yourCompany')
images_action_customize = Button('images_action_customize', 'xpath', "//a[@id='images__action_customize']", TemplatePage, None)
images_action_create = Button('images_action_create', 'xpath', "//a[@id='images__action_create']", TemplatePage, None)
imagesTable = Table('imagesTable', 'xpath', "//div[@id='image_tabs__self_images_tab']/div/form/div[2]//table[@id='images']", TemplatePage, None)
Imageidname = Editor('Imageidname', 'xpath', "//input[@id='id_name']", TemplatePage, None)
Imageiddescription = Editor('Imageiddescription', 'xpath', "//textarea[@id='id_description']", TemplatePage, None)
imageSave = Button('imageSave', 'xpath', "//input[contains(@class,'btn btn-primary')]", TemplatePage, None)

#selectOSInImage = Button('selectOSInImage', 'xpath', "//span[contains(text(),'请选择操作')]", TemplatePage, None)
id_os_type_chosen = Button('id_os_type_chosen', 'xpath', "//div[@id='id_os_type_chosen']", TemplatePage, None)


ImageCreateServername = Editor('ImageCreateServername', 'xpath', "//input[@id='name']", TemplatePage, None)
ImageCreateinstancecount = Editor('ImageCreateinstancecount', 'xpath', "//input[@id='instance_count']", TemplatePage, None)
Imageflavorstype = ComboBox('Imageflavorstype', 'xpath', "//select[@id='flavors_type']", TemplatePage, None,{})
Imageflavor = ComboBox('Imageflavor', 'xpath', "//select[@id='flavor']", TemplatePage, None,{})
ImagetextContent = Editor('ImagetextContent', 'xpath', "//textarea[@id='textContent']", TemplatePage, None)
ImageNext1 = Button('ImageNext1', 'xpath', "//span[contains(text(),'下一步')]", TemplatePage, None)
Imagesn = ComboBox('Imagesn', 'xpath', "//select[@id='sn']", TemplatePage, None,{})
Imagessn = ComboBox('ssn', 'xpath', "//select[@id='ssn']", TemplatePage, None,{})

ImageNext2 = Button('ImageNext2', 'xpath', "//span[contains(text(),'下一步')]", TemplatePage, None)
Imagekpcheck = CheckBox('Imagekpcheck', 'xpath', "//input[@id='kpcheck']", TemplatePage, None)
Imagepswdcheck = CheckBox('Imagepswdcheck', 'xpath', "//input[@id='pswdcheck']", TemplatePage, None)
#Imageadminpassword = Editor('Imageadminpassword', 'xpath', "//input[contains(@class,'form-control ng-pristine ng-untouched ng-invalid ng-invalid-required ng-valid-pattern ng-valid-minlength ng-valid-maxlength')]", TemplatePage, None)
Imageadminpassword = Editor('adminpassword', 'xpath', "//input[@id='adminpassword']/parent::div/input[2]", TemplatePage, None)

#ImageCreateButton = Button('ImageCreateButton', 'xpath', "//div[contains(@class,'modal-footer')]", TemplatePage, None)
#ImageCreateButton = Button('ImageCreateButton', 'xpath', "//button[contains(@class,'btn btn-primary button-final')]", TemplatePage, None)
#ImageCreateButton = Button('ImageCreateButton', 'xpath', "//span[contains(text(),'创建')]", TemplatePage, None)
ImageCreateButton = Button('ImageCreateButton', 'xpath', "/html/body/div[4]/div/div/customcreateinstancewizard/div/div[3]/button[4]/span[2]", TemplatePage, None)

ImageCinderidname = Editor('Imageidname', 'xpath', "//input[@id='id_name']", TemplatePage, None)
ImageCinderiddescription = Editor('ImageCinderiddescription', 'xpath', "//textarea[@id='id_description']", TemplatePage, None)
ImageCinderidsize = Editor('ImageCinderidsize', 'xpath', "//input[@id='id_size']", TemplatePage, None)
ImageCreateCinderButton = Button('ImageCreateCinderButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", TemplatePage, None)


RouterPage = WebPage('RouterPage', 'title','路由器 Neo-CloudUltra - yourCompany')
routers_action_create = Button('routers_action_create', 'xpath', "//a[@id='routers__action_create']", RouterPage, None)

Routername = Editor('Routername', 'xpath', "//input[@id='id_name']", RouterPage, None)
CreateRouterButton = Button('CreateRouterButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", RouterPage, None)
routersTable = Table('routersTable', 'xpath', "//table[@id='routers']", RouterPage, None)
EditRoutername = Editor('EditRoutername', 'xpath', "//input[@id='id_name']", RouterPage, None)
RouterEditSave = Button('RouterEditSave', 'xpath', "//input[contains(@class,'btn btn-primary')]", RouterPage, None)
FoibidRouterButton = Button('FoibidRouterButton', 'xpath', "//a[contains(text(),'禁用路由器')]", RouterPage, None)
DeleteRouterButton = Button('DeleteRouterButton', 'xpath', "//a[contains(text(),'删除路由器')]", RouterPage, None)
# RouterChooseQos = Button('QosChooseProject', 'xpath', "//div[@id='id_qos_chosen']", RouterPage, None)

RouterChooseIngressQos = Button('QosChooseProject', 'xpath', "//div[@id='id_ingress_qos_chosen']", RouterPage, None)
RouterChooseEgressQos = Button('QosChooseProject', 'xpath', "//div[@id='id_egress_qos_chosen']", RouterPage, None)




RouterQosCommit = Button('RouterQosCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", RouterPage, None)
RemoveQosCommit = Button('RemoveQosCommit', 'xpath', "//a[contains(text(),'移除QoS')]", RouterPage, None)

PublicNetworkChoose = Button('PublicNetworkChoose', 'xpath', "//div[@id='id_network_id_chosen']", RouterPage, None)
PublicSubNetworkChoose = Button('PublicSubNetworkChoose', 'xpath', "//div[@id='id_subnet_id_chosen']", RouterPage, None)
RpublicNetCommit = Button('RpublicNetCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", RouterPage, None)
DisconnectPublicInRouter = Button('DisconnectPublicInRouter', 'xpath', "//a[contains(text(),'断开外部网')]", RouterPage, None)


QosPage = WebPage('QosPage', 'title','QoS Neo-CloudUltra - yourCompany')
qoses_action_delete = Button('qoses_action_delete', 'xpath', "//button[@id='qoses__action_delete']", QosPage, None)
DeleteQosButton = Button('DeleteQosButton', 'xpath', "//a[contains(text(),'删除QoS')]", QosPage, None)
basesearch_input = Editor('basesearch_input', 'xpath', "//input[@id='base_search_input']", QosPage, None)
basesearch_button = Button('basesearch_button', 'xpath', "//button[@id='base_search_button']", QosPage, None)

qoses_action_create = Button('qoses_action_create', 'xpath', "//div[@id='app']/div/div[2]/div[2]/div[1]/div[2]/div/div[2]/div/div[1]/div/button", QosPage, None)
QosChooseProject = Button('QosChooseProject', 'xpath', "//div[@id='id_tenant_id_chosen']", QosPage, None)
Qosidname = Editor('Qosidname', 'xpath', "//input[@id='id_name']", QosPage, None)
Qosiddescription = Editor('Qosiddescription', 'xpath', "//textarea[@id='id_description']", QosPage, None)
Qosidmax_rate = Editor('Qosidmax_rate', 'xpath', "//input[@id='id_max_rate']", QosPage, None)
QosChooseDirection = Button('QosChooseProject', 'xpath', "//div[@id='id_direction_chosen']", QosPage, None)
QosCreateButton = Button('QosCreateButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", QosPage, None)
qosesTable = Table('qosesTable', 'xpath', "//table[@id='qoses']", QosPage, None)
QosEditidname = Editor('QosEditidname', 'xpath', "//input[@id='id_name']", QosPage, None)
QosEditdescription = Editor('QosEditdescription', 'xpath', "//textarea[@id='id_description']", QosPage, None)
QosEditidmax_rate = Editor('QosEditidmax_rate', 'xpath', "//input[@id='id_max_rate']", QosPage, None)
QosEditCommit = Button('QosEditCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", QosPage, None)

FirewallPage = WebPage('FirewallPage', 'title','防火墙 Neo-CloudUltra - yourCompany')

securitygroups_action_create = Button('securitygroups__action_create', 'xpath', "//a[@id='security_groups__action_create']", FirewallPage, None)
Firewallidname = Editor('Firewallidname', 'xpath', "//input[@id='id_name']", FirewallPage, None)
Firewalliddescription = Editor('Firewalliddescription', 'xpath', "//textarea[@id='id_description']", FirewallPage, None)
FirewallCreateButton = Button('FirewallCreateButton', 'xpath', "//input[contains(@class,'btn btn-primary')]", FirewallPage, None)
FirewallEditidname = Editor('FirewallEditidname', 'xpath', "//input[@id='id_name']", FirewallPage, None)
FirewallEditdesc = Editor('FirewallEditdesc', 'xpath', "//textarea[@id='id_description']", FirewallPage, None)
FirewallEditCommit = Button('FirewallEditCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", FirewallPage, None)
FirewallDeleteCommit = Button('FirewallDeleteCommit', 'xpath', "//a[contains(text(),'删除防火墙')]", FirewallPage, None)
securitygroupsTable = Table('securitygroupsTable', 'xpath', "//table[@id='security_groups']", FirewallPage, None)


KeyPairPage = WebPage('KeyPairPage', 'title','密钥对 Neo-CloudUltra - yourCompany')

keypair_action_addkeypair = Button('keypair_action_addkeypair', 'xpath', "//a[@id='keypair__action_addkeypair']", KeyPairPage, None)
keypair_action_importkeypair = Button('keypair_action_importkeypair', 'xpath', "//a[@id='keypair__action_importkeypair']", KeyPairPage, None)
Keypairidname = Editor('Keypairidname', 'xpath', "//input[@id='id_name']", KeyPairPage, None)
KeypairCreate = Button('KeypairCreate', 'xpath', "//input[contains(@class,'btn btn-primary')]", KeyPairPage, None)
keypairTable = Table('keypairTable', 'xpath', "//table[@id='keypair']", KeyPairPage, None)
KeyPairDelete = Button('KeyPairDelete', 'xpath', "//a[contains(text(),'删除')]", KeyPairPage, None)

TestPage2 = WebPage('TestPage2', 'title','下载密钥对 Neo-CloudUltra - yourCompany')

KeyPairMenu1 = Button('KeyPairMenu1', 'xpath', "//ul[@id='sidebar-accordion-security']/li[2]/a", TestPage2, None)


FloatIPPage = WebPage('FloatIPPage', 'title','浮动IP Neo-CloudUltra - yourCompany')

floatingips_action_table_release = Button('floatingips__action_table_release', 'xpath', "//button[@id='floating_ips__action_table_release']", FloatIPPage, None)
floatingips_action_allocate = Button('floatingips__action_allocate', 'xpath', "//a[@id='floating_ips__action_allocate']", FloatIPPage, None)
#FloatIPChoosePubNet = Button('FloatIPChoosePubNet', 'xpath', "//div[@id='id_pool_chosen']", FloatIPPage, None)
FloatIPChoosePubNet = Button('FloatIPChoosePubNet', 'xpath', "//div[@id='id_network_id_chosen']", FloatIPPage, None)

FloatSIPChoosePubsubNet = Button('FloatIPChoosePubNet', 'xpath', "//div[@id='id_subnet_id_chosen']", FloatIPPage, None)

FIPCommit = Button('FIPCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", FloatIPPage, None)
#FIPQosChoose = Button('FloatIPChoosePubNet', 'xpath', "//div[@id='id_qos_chosen']", FloatIPPage, None)
FIPQosChoose = Button('FloatIPChoosePubNet', 'xpath', "//div[@id='id_egress_qos_chosen']", FloatIPPage, None)

FIPQosCommit = Button('FIPQosCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", FloatIPPage, None)
FIPQoSRemove = Button('FIPQoSRemove', 'xpath', "//a[contains(text(),'移除QoS')]", FloatIPPage, None)
FIPRelease = Button('FIPRelease', 'xpath', "//a[contains(text(),'释放浮动I')]", FloatIPPage, None)

floatingipsTable = Table('floatingipsTable', 'xpath', "//table[@id='floating_ips']", FloatIPPage, None)

CLBPage = WebPage('CLBPage', 'title','负载均衡 Neo-CloudUltra - yourCompany')

pools_action_delete = Button('pools_action_delete', 'xpath', "//button[@id='pools__action_delete']", CLBPage, None)
pools_action_create = Button('pools_action_create', 'xpath', "//a[@id='pools__action_create']", CLBPage, None)

clbTab = Button('clbTab', 'xpath', "//a[contains(@href,'?tab=pool_tabs__pool')]", CLBPage, None)
poolsTable = Table('poolsTable', 'xpath', "//table[@id='pools']", CLBPage, None)


CLBidname = Editor('CLBidname', 'xpath', "//input[@id='id_name']", CLBPage, None)
ClbDuplicateChoose = Button('ClbDuplicateChoose', 'xpath', "//div[@id='id_replicas_chosen']", CLBPage, None)
CLBidmaxconn = Editor('CLBidmaxconn', 'xpath', "//input[@id='id_maxconn']", CLBPage, None)
ClbHAChoose = Button('ClbHAChoose', 'xpath', "//div[@id='id_ha_subnet_id_chosen']", CLBPage, None)
CLBiddescription = Editor('CLBiddescription', 'xpath', "//textarea[@id='id_description']", CLBPage, None)
CLBCommit = Button('CLBCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CLBPage, None)

CLBEditidname = Editor('CLBEditidname', 'xpath', "//input[@id='id_name']", CLBPage, None)
CLBEditidmaxconn = Editor('CLBEditidmaxconn', 'xpath', "//input[@id='id_maxconn']", CLBPage, None)
CLBEditidreplicas = Editor('CLBEditidreplicas', 'xpath', "//input[@id='id_replicas']", CLBPage, None)
CLBEditiddescription = Editor('CLBEditiddescription', 'xpath', "//textarea[@id='id_description']", CLBPage, None)
CLBEditCommit = Button('CLBEditCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CLBPage, None)

ClbAddPubNetChoose = Button('ClbAddPubNetChoose', 'xpath', "//div[@id='id_subnet_id_chosen']", CLBPage, None)
CLBAddPNCommit = Button('CLBAddPNCommit', 'xpath', "//form[@id='add_public_ip_form']/div[2]/div/div/input", CLBPage, None)

ClbQoSChoose = Button('ClbQoSChoose', 'xpath', "//div[@id='id_egress_qos_chosen']", CLBPage, None)
CLBQoSCommit = Button('CLBQoSCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CLBPage, None)

CLBRemoveQoS = Button('CLBRemoveQoS', 'xpath', "//a[contains(text(),'移除QoS')]", CLBPage, None)

CLBRemovePN = Button('CLBRemovePN', 'xpath', "//a[contains(text(),'删除公网IP')]", CLBPage, None)

CLBDeleteCommit = Button('CLBDeleteCommit', 'xpath', "//a[contains(text(),'删除负载均')]", CLBPage, None)

backendTab = Button('backendTab', 'xpath', "//a[contains(@href,'?tab=pool_tabs__backend')]", CLBPage, None)
backendsTable = Table('backendsTable', 'xpath', "//table[@id='backends']", CLBPage, None)

backends_action_create_backend = Button('backends_action_create_backend', 'xpath', "//a[@id='backends__action_create_backend']", CLBPage, None)
Backendidname = Editor('Backendidname', 'xpath', "//input[@id='id_name']", CLBPage, None)
BackEndidaddress = Editor('BackEndidaddress', 'xpath', "//input[@id='id_address']", CLBPage, None)
BackEndidport = Editor('BackEndidport', 'xpath', "//input[@id='id_port']", CLBPage, None)
BackEndiddescription = Editor('BackEndiddescription', 'xpath', "//textarea[@id='id_description']", CLBPage, None)
BackEndCommit = Button('BackEndCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CLBPage, None)

BackEndUpdatename = Editor('BackEndUpdatename', 'xpath', "//input[@id='id_name']", CLBPage, None)
BackEndUpdateidaddress = Editor('BackEndUpdateidaddress', 'xpath', "//input[@id='id_address']", CLBPage, None)
BackEndUpdateidport = Editor('BackEndUpdateidport', 'xpath', "//input[@id='id_port']", CLBPage, None)
BackEndUpdatedescription = Editor('BackEndUpdatedescription', 'xpath', "//textarea[@id='id_description']", CLBPage, None)
BackEndUpdateCommit = Button('BackEndUpdateCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CLBPage, None)

BackEndRemove = Button('BackEndRemove', 'xpath', "//a[contains(text(),'删除后端')]", CLBPage, None)

certificateTab = Button('certificateTab', 'xpath', "//a[contains(@href,'?tab=pool_tabs__certificate')]", CLBPage, None)
certificatesTable = Table('certificatesTable', 'xpath', "//table[@id='certificates']", CLBPage, None)
certificates_action_create_certificate = Button('certificates_action_create_certificate', 'xpath', "//a[@id='certificates__action_create_certificate']", CLBPage, None)

Ceridname = Editor('Ceridname', 'xpath', "//input[@id='id_name']", CLBPage, None)
Publicidcertificate = Editor('Publicidcertificate', 'xpath', "//textarea[@id='id_certificate']", CLBPage, None)
Privateidkey = Editor('Privateidkey', 'xpath', "//textarea[@id='id_key']", CLBPage, None)
Ceriddescription = Editor('Ceriddescription', 'xpath', "//textarea[@id='id_description']", CLBPage, None)
CerCommit = Button('CerCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CLBPage, None)

CerUpdateidname = Editor('CerUpdateidname', 'xpath', "//input[@id='id_name']", CLBPage, None)
Updateidcertificate = Editor('Updateidcertificate', 'xpath', "//textarea[@id='id_certificate']", CLBPage, None)
Updateidkey = Editor('Updateidkey', 'xpath', "//textarea[@id='id_key']", CLBPage, None)
Updateiddescription = Editor('Updateiddescription', 'xpath', "//textarea[@id='id_description']", CLBPage, None)
UpdateCerCommit = Button('UpdateCerCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CLBPage, None)

CerRemove = Button('CerRemove', 'xpath', "//a[contains(text(),'删除证书')]", CLBPage, None)


CachePage = WebPage('CachePage', 'title','缓存 Neo-CloudUltra - yourCompany')

cachedatabases__action_delete = Button('cachedatabases__action_delete', 'xpath', "//button[@id='cache_databases__action_delete']", CachePage, None)
cachedatabases__action_launch = Button('cachedatabases__action_launch', 'xpath', "//a[@id='cache_databases__action_launch']", CachePage, None)

Cacheidname = Editor('Cacheidname', 'xpath', "//input[@id='id_name']", CachePage, None)
CacheSizeChoose = Button('CacheSizeChoose', 'xpath', "//div[@id='id_flavor_chosen']", CachePage, None)
CacheNetworkChoose = Button('CacheNetworkChoose', 'xpath', "//div[@id='id_network_id_chosen']", CachePage, None)
CacheVersionChoose = Button('CacheVersionChoose', 'xpath', "//div[@id='id_datastore_chosen']", CachePage, None)
CacheHaModeChoose = Button('CacheHaModeChoose', 'xpath', "//div[@id='id_ha_mode_chosen']", CachePage, None)
CacheCreate = Button('CacheCreate', 'xpath', "//input[contains(@class,'btn btn-primary')]", CachePage, None)
cachedatabasesTable = Table('cachedatabasesTable', 'xpath', "//div[@id='content_body']/div[2]/div[1]/div/div[2]/div/form/div[2]//table[@id='cache_databases']", CachePage, None)

CacheEditidname = Editor('CacheEditidname', 'xpath', "//input[@id='id_name']", CachePage, None)
CacheEditCommit = Button('CacheEditCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", CachePage, None)

CacheRestart = Button('CacheRestart', 'xpath', "//a[contains(text(),'重启实例')]", CachePage, None)

CacheDelete = Button('CacheDelete', 'xpath', "//a[contains(text(),'删除缓存')]", CachePage, None)



ArrangePage = WebPage('ArrangePage', 'title','资源编排 Neo-CloudUltra - yourCompany')

viewstack_table__action_delete = Button('viewstack_table__action_delete', 'xpath', "//button[@id='view_stack_table__action_delete']", ArrangePage, None)
viewstack_table__action_create = Button('viewstack_table__action_create', 'xpath', "//a[@id='view_stack_table__action_create']", ArrangePage, None)
viewstack_table = Table('viewstack_table', 'xpath', "//div[@id='content_body']/div[2]/div[1]/div/div[2]/div/form/div[2]//table[@id='view_stack_table']", ArrangePage, None)
NoNeedArrange = Button('NoNeedArrange', 'xpath', "//button[contains(text(),'不再需要')]", ArrangePage, None)

ArrangeServer = Button('ArrangeServer', 'xpath', "//div[@id='app']/div/div[1]/div[1]", ArrangePage, None)
CinderArrange = Button('CinderArrange', 'xpath', "//div[@id='app']/div/div[1]/div[2]/span", ArrangePage, None)
PNArrange = Button('PNArrange', 'xpath', "//span[contains(text(),'公网IP')]", ArrangePage, None)
PriNArrange = Button('PriNArrange', 'xpath', "//span[contains(text(),'私网')]", ArrangePage, None)
CLBArrange = Button('CLBArrange', 'xpath', "//div[@id='app']/div/div[1]/div[5]", ArrangePage, None)
FirewallArrange = Button('FirewallArrange', 'xpath', "//div[@id='app']/div/div[1]/div[6]/span", ArrangePage, None)
RouterArrange = Button('Router', 'xpath', "//div[@id='app']/div/div[1]/div[7]/span", ArrangePage, None)
MySQLArrange = Button('MySQLArrange', 'xpath', "//div[@id='app']/div/div[1]/div[8]", ArrangePage, None)

projectsCommbox = ComboBox('projectsCommbox', 'xpath', "//select[@id='projects']", MainPage1, None,{})
Adjustidflavor = ComboBox('Adjustidflavor', 'xpath', "//select[@id='id_flavor']", MainPage1, None,{})
AdjustCommit = Button('AdjustCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", MainPage1, None)
ComfirmAd = Button('ComfirmAd', 'xpath', "//a[contains(text(),'确认调整规')]", MainPage1, None)

ServerClassMenu = Button('ServerClassMenu', 'xpath', "//span[contains(text(),'云主机类型')]", TestPager, None)
flavorsgeneral__action_create = Button('flavorsgeneral__action_create', 'xpath', "//a[@id='flavors_general__action_create']", TestPager, None)
ServerClassidname = Editor('ServerClassidname', 'xpath', "//input[@id='id_name']", TestPager, None)
ServerClassidflavor_id = Editor('ServerClassidflavor_id', 'xpath', "//input[@id='id_flavor_id']", TestPager, None)
ServerClassidvcpus = Editor('ServerClassidvcpus', 'xpath', "//input[@id='id_vcpus']", TestPager, None)
ServerClassidmemory_mb = Editor('ServerClassidmemory_mb', 'xpath', "//input[@id='id_memory_mb']", TestPager, None)
ServerClassiddisk_gb = Editor('ServerClassiddisk_gb', 'xpath', "//input[@id='id_disk_gb']", TestPager, None)
ServerClassideph_gb = Editor('ServerClassideph_gb', 'xpath', "//input[@id='id_eph_gb']", TestPager, None)
ServerClassCommit = Button('ServerClassCommit', 'xpath', "//input[contains(@class,'btn btn-primary')]", TestPager, None)

flavorsgeneral = Table('flavorsgeneral', 'xpath', "//table[@id='flavors_general']", TestPager, None)
DeleteServerSizeConfirm = Button('DeleteServerSizeConfirm', 'xpath', "//a[contains(text(),'删除云主机')]", TestPager, None)


FirstPage = WebPage('FirstPage', 'title','概况 Neo-CloudUltra - yourCompany')

Menu_Server_1 = Button('Menu_Server_1', 'xpath', "//ul[@id='sidebar-accordion-platformcompute']/li[1]/a", FirstPage, None)



NewPage = WebPage('NewPage', 'title','回收站 Neo-CloudUltra - test')

ComputeMenu_01 = Button('ComputeMenu_01', 'xpath', "//ul[@id='side-menu']/li[2]/a", NewPage, None)
StorangeMenu_tab = Button('StorangeMenu_tab', 'xpath', "//ul[@id='side-menu']/li[3]/a", NewPage, None)
NetworkMenu_tab = Button('NetworkMenu_tab', 'xpath', "//div[@id='app']/div/div[1]/ul/li[5]/div", NewPage, None)
# project_admin的定位
ProjetAdmin_NetworkMenu_tab = Button('NetworkMenu_tab', 'xpath', "//ul[@id='side-menu']/li[5]/a", NewPage, None)
ArrangeMenu_01 = Button('ArrangeMenu_01', 'xpath', "//ul[@id='side-menu']/li[7]/a", NewPage, None)
SecurityMenu_01 = Button('SecurityMenu_01', 'xpath', "//ul[@id='side-menu']/li[8]/a", NewPage, None)
BillingMenu_01 = Button('BillingMenu_01', 'xpath', "//ul[@id='side-menu']/li[10]/a", NewPage, None)


tenants_project_filter__q = Editor('tenants_project_filter__q', 'xpath', "//input[@name='tenants__project_filter__q']", ee, None)
tenants_action_project_filter = Button('tenants_action_project_filter', 'xpath', "//button[@id='tenants__action_project_filter']", ee, None)
users_user_filter__q = Editor('users_user_filter__q', 'xpath', "//input[@name='users__user_filter__q']", ee, None)
users_action_user_filter = Button('users_action_user_filter', 'xpath', "//button[@id='users__action_user_filter']", ee, None)



